package com.ruoyi.controller;

import com.kuaidi100.sdk.request.QueryTrackParam;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.domain.KuaiDi100Response;
import com.ruoyi.service.KuaiDi100Service;
import com.ruoyi.utils.SimpleResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/kuaidi100")
public class KuaiDi100Controller {
    @Autowired
    private KuaiDi100Service kuaiDi100Service;

    @PostMapping("/query")
    public SimpleResult queryMaterialFlow(@RequestBody QueryTrackParam param) {
        System.out.println("请求参数----->"+param);
        final KuaiDi100Response result = kuaiDi100Service.queryMaterialFlow(param.getCom(), param.getNum());
        System.out.println("返回---->"+result);
        return SimpleResult.success(result);
    }

}
